package com.designpatterns.creational.builder;

public class ActorController {
    public Actor construct(ActorBuilder ab){
        Actor actor;
        ab.buildCostume();
        ab.buildFace();
        /**
         * 用钩子函数实现精细控制
         */
        if(ab.isBareheaded()){
            ab.buildHairstyle();
        }
        ab.buildSex();
        ab.buildType();
        actor = ab.createActor();
        return actor;
    }
}
